﻿@using System.Web.Optimization
@model GroceryPriceBook.Core.ViewModel.Store

@{
	ViewBag.Title = "Edit";
}

@section scripts
{
	@Scripts.Render("~/bundles/form/js")
}

<div class="row">
	<div class="large-12 columns">
		@using (Html.BeginForm("Edit", "Store", FormMethod.Post, new { @id = "formStore", @data_abide = "" }))
		{
			@Html.AntiForgeryToken()
			<h4>Store</h4>
			<hr />
			@Html.HiddenFor(model => model.Id)
			<div class="row">
				<div class="large-12 columns">
					<div class="row">
						<div class="large-1 small-3 columns">
							@Html.LabelFor(model => model.Name, new { @class = "right inline" })
						</div>
						<div class="large-11 small-9 columns">
							@Html.TextBoxFor(model => model.Name, new { @required = "" })
							<small class="error">Name is required and must be a string.</small>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="large-12 columns">
					<div class="row">
						<div class="large-1 small-3 columns">
							@Html.LabelFor(model => model.Address, new { @class = "right inline" })
						</div>
						<div class="large-11 small-9 columns">
							@Html.TextBoxFor(model => model.Address)
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="large-12 columns">
					<div class="row">
						<div class="large-1 small-1 columns">
							@Html.LabelFor(model => model.IsActive, new { @class = "right" })
						</div>
						<div class="large-11 small-11 columns">
							@Html.CheckBoxFor(model => model.IsActive, new { @class = "" })
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="large-12">
					<button type="submit">Submit</button>
				</div>
			</div>
		}

		<div class="row">
			<div class="large-12">
				@Html.ActionLink("Back to List", "Index")
			</div>
		</div>
	</div>
</div>
